function plot_time_residual_10000_2000()
%close all
h = clf;
data_path = 'result/10000_2000_10/';
data_name = { 'anls_seq' , 'anls_ms_2' , 'anls_ms_4' , 'anls_ms_8' , ...
              'anls_ms_16' , 'anls_ms_32' , 'anls_ms_64' };
num_core = {'1', '2', '4', '8', '16', '32', '64'};
%eps_output = '/home/tqlong/Dropbox/report/distnmf/paper1/figures/plot_runtime_res_concensus_1000_200.eps';
eps_output = 'c:/users/wk/Dropbox/report/distnmf/paper1/figures/plot_time_residual_10000_2000.eps';
for i=1:length(data_name);
    a = load([data_path data_name{i}]);
    
    subplot(1,2,1)
    set(gca,'XDir','Reverse')
    x = a(:,5); y = a(:,2);
    n = floor(length(x) / 2);
    loglog(x,y), hold on
    text(x(n), y(n), ['\fontsize{12}\bf{' num_core{i} '}'], 'HorizontalAlignment', 'center')
    xlabel('residual');
    ylabel('runtime (seconds)');
    axis(10.^[(-2) 2 -1 4])
    title('ADMM');
end

data_path = 'result/10000_2000_10/';
data_name = { 'bpp_seq' , 'bpp_ms_2' , 'bpp_ms_4' , 'bpp_ms_8' , ...
              'bpp_ms_16' , 'bpp_ms_32' , 'bpp_ms_64' };
num_core = {'1', '2', '4', '8', '16', '32', '64'};

for i=1:length(data_name);
    a = load([data_path data_name{i}]);
    
    subplot(1,2,2)
    set(gca,'XDir','Reverse')
    x = a(:,5); y = a(:,2);
    n = floor(length(x) / 2);
    loglog(x,y), hold on
    text(x(n), y(n), ['\fontsize{12}\bf{' num_core{i} '}'], 'HorizontalAlignment', 'center')
    xlabel('residual');
    ylabel('runtime (seconds)');
    axis(10.^[(-2) 2 -1 4])
    title('BPP');
end

print(h, '-depsc', '-tiff', '-r300', eps_output);


end
